import request from '@/utils/request'

// 查询商品主图链接管理列表
export function listPic(query) {
  return request({
    url: '/business/pic/list',
    method: 'get',
    params: query
  })
}

// 查询商品主图链接管理详细
export function getPic(id) {
  return request({
    url: '/business/pic/' + id,
    method: 'get'
  })
}

// 新增商品主图链接管理
export function addPic(data) {
  return request({
    url: '/business/pic',
    method: 'post',
    data: data
  })
}

// 修改商品主图链接管理
export function updatePic(data) {
  return request({
    url: '/business/pic',
    method: 'put',
    data: data
  })
}

// 删除商品主图链接管理
export function delPic(id) {
  return request({
    url: '/business/pic/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/pic/export',
    method: 'post',
    data: data
  })
}

// 导出无主图商品数据文件
export function exportNoImg(){
  return request({
    url: '/business/pic/exportNoImg',
    method: 'post'
  })
}
